﻿#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 ZHENG Zhong <heavyzheng nospam at gmail D0T com>
# - http://heavyz.blogspot.com/
# - http://buggarden.blogspot.com/
#
# URL configuration for the forum webapp.
#
# Created on 2008-05-07.
# $Id: urls.py 291 2008-12-03 10:17:53Z heavyzheng $
#

from django.conf.urls.defaults import patterns

urlpatterns = patterns( "buggarden.apps.forum.views",
    
    # GET/POST views.
    ( r"^$"                              , "view_forum"          ),
    ( r"^board/(?P<id>\d+)/$"            , "view_board"          ),
    ( r"^thread/(?P<id>\d+)/$"           , "view_thread"         ),
    ( r"^attachment/(?P<id>\d+)/$"       , "get_attachment"      ),
    ( r"^attachment/(?P<id>\d+)$"        , "get_attachment"      ),
    ( r"^create_board/$"                 , "create_board"        ),
    ( r"^create_board_result/$"          , "create_board_result" ),
    
    ( r"^admin/$"                        , "admin_forum"         ),
    
    # ( r"^board/(?P<id>\d+)/manage/$"     , "manage_board"        ),
    # ( r"^manage/$"                       , "manage_forum"        ),
    
    # AJAX views.
    ( r"^board/(?P<id>\d+)/add_thread/$" , "add_thread_to_board" ),
    ( r"^thread/(?P<id>\d+)/add_reply/$" , "add_reply_to_thread" ),
    ( r"^thread/(?P<id>\d+)/edit/$"      , "edit_thread"         ),
    ( r"^reply/(?P<id>\d+)/edit/$"       , "edit_reply"          ),
    ( r"^thread/(?P<id>\d+)/delete/$"    , "delete_thread"       ),
    ( r"^reply/(?P<id>\d+)/delete/$"     , "delete_reply"        ),
    ( r"^thread/(?P<id>\d+)/recommend/$" , "recommend_thread"    ),
    ( r"^thread/(?P<id>\d+)/lock/$"      , "lock_thread"         ),
    
    # Update datastore models.
    # ( r"^update_models/$"                , "update_models"       ),

)


